<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="css/account.css" />
</head>
<body>
<div align="center">
    <form >
        账号:<input type="text" id="zh" name="zh">
        <br/>
        密码:<input type="text" id="pwd" name="pwd">
        <br/>
        <input type="button" id="dl" value="登录">
        <input type="button" id="zc" value="注册">
    </form>
</div>
</body>
<script type="text/javascript" src="/Maven_jiaxiao_war_exploded/js/jquery2.2.4.js"></script>
<script>
    $("#dl").click(function (){
        var zh=$("#zh").val();
        var pwd=$("#pwd").val();
        $.ajax({
            "url":"/Maven_jiaxiao_war_exploded/login",
            "type":"get",
            "data":{"zh":zh,"pwd":pwd},
            "dataType":"text",
            "success":function(pd){
                if(pd.indexOf("true")>-1){
                    alert("登录成功");
                    window.location.href="index.html";
                }else{
                    alert("账号或者密码错误");
                }
            }
        })
    })

    $("#zc").click(function (){
       window.location.href="/Maven_jiaxiao_war_exploded/zhuche.html";
    })
</script>
</html>